
<div id="tagbox"></div>

<b>Wybierz miejsce lub dodaj</b> 
<input id="editbtn" type="button" value="Wlacz tryb edycji" onclick="switchEditMode()" />

<br /><br />
<div >
	<div id="setLocation">
	<b>Lokalizacja przedmiotu:</b><br />
	<table>
	  <tr>
	    <td style="width:70px;">Nazwa</td>
	    <td><input class="formElement" id="eventLocationName" type="text" value="" /></td>
	  </tr>
	  <tr>
	    <td>Adres</td>
	    <td><input class="formElement"  id="eventLocationAdres" type="text" value="" /></td>
	  </tr>
	  <tr>
	    <td>Miasto</td>
	    <td><input class="formElement"  id="eventLocationCity" type="text" value="Krakow" /></td>
	  </tr>
	  <tr>
	    <td>Dzielnica</td>
	    <td><input class="formElement"  id="eventLocationLocationName" type="text" value="" /></td>
	  </tr>
	  <tr>
	    <td>Opis</td>
	    <td><textarea class="formElement" style="height: 30px;"  id="eventLocationDescription"></textarea>
	    </td>
	  </tr>
	</table>
	</div>
	<br />
	
	<div id="setEvent">
	<b>Dane leku:</b><br />
	<table>
	  <tr>
	    <td style="width:70px;">Nazwa leku</td>
	    <td><input class="formElement" id="eventName" type="text" value="" /></td>
	  </tr>
	  <tr>
	    <td>Opis</td>
	    <td><textarea class="formElement" style="height: 30px;"  id="eventDescription"></textarea>	    
	    </td>
	  </tr>  
	  <tr>
	    <td>Wartosc</td>
	    <td><input class="formElement"  id="eventValue" type="text" value="" /></td>
	  </tr>
	  <tr>
	    <td>Tagi</td>
	    <td>
		    <select class="formElement" id="tagItem" size="3" multiple>
		        <!--  <option value="1">maple</option>-->
				<?php
					$f =  Communicator::getTag();
					$f = str_replace("&lt;", "<", $f);
					$f = str_replace("&gt;", ">", $f);
					$xml = simplexml_load_string($f);
					foreach ($xml->tag as $element) {
						echo '<option value="'.$element.'">'.$element.'</option>';
					} 
				?>		        
		    </select>
	    </td>
	  </tr>
	  <tr>
	    <td>Kategorie</td>
	    <td>
 			<select class="formElement" id="categoryItem" size="3" multiple>
				<?php
					$f = Communicator::getCategory();
					$f = str_replace("&lt;", "<", $f);
					$f = str_replace("&gt;", ">", $f);
					$xml = simplexml_load_string($f);
					foreach ($xml->categoryItem as $element) {
						foreach ($element->category as $category) {
							echo '<option value="'.+$category->attributes().'">'.$category.'</option>';
						}
						foreach ($element->level as $level) {
							echo '<option value="'.+$level->attributes().'">&nbsp;&nbsp;'.$level.'</option>';
						}
					} 
				?>		        
		    </select>	 	    
	    </td>
	  </tr>
	
	</table>
	</div>
	<br />
	<input id="addItemBtn" type="button" value="Dodaj przedmiot" onclick="addItem()" /><br />
	

</div>